
package group2assignone.view;

import java.awt.BorderLayout;
import javax.swing.*;

/**
 *
 * @author group2
 */
public class UITool extends JFrame {

    public static void displayError(String error, OurView view) {
        JOptionPane.showMessageDialog(view, error, "Error", JOptionPane.ERROR_MESSAGE);
    }

    public static void addPanels(JPanel n, JPanel s, JPanel e, JPanel w, JPanel c, OurView view) {
        view.add(n, BorderLayout.NORTH);
        view.add(s, BorderLayout.SOUTH);
        view.add(e, BorderLayout.EAST);
        view.add(w, BorderLayout.WEST);
        view.add(c, BorderLayout.CENTER);
    }
    
    public static void setUp(OurView view){
        view.setSize(600, 400);
        view.setVisible(true);
        view.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        view.pack();
    }
    
    
}
